/* BASICS */
.CodeMirror {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono',
    monospace;
  direction: ltr;
  font-size: 14px;
  z-index: 0;
  border-radius: 5px;
  height: auto;
  background: transparent;
  position: relative;
  overflow: hidden;
}

.CodeMirror-lines {
  padding: 4px 0; /* Vertical padding around content */
}

.CodeMirror pre {
  padding: 0 4px; /* Horizontal padding of content */
  -moz-border-radius: 0;
  -webkit-border-radius: 0;
  border-radius: 0;
  border-width: 0;
  background: transparent;
  font-family: inherit;
  font-size: inherit;
  margin: 0;
  white-space: pre;
  word-wrap: normal;
  line-height: inherit;
  color: inherit;
  z-index: 2;
  position: relative;
  overflow: visible;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-variant-ligatures: contextual;
  font-variant-ligatures: contextual;
}

/* GUTTER */
.CodeMirror-gutters {
  /* border-right: 1px solid #ddd; */
  background-color: #f7f7f7;
  white-space: nowrap;
}

.CodeMirror-linenumber {
  padding: 0 3px 0 3px;
  min-width: 25px;
  text-align: right;
  color: #999;
  white-space: nowrap;
}

/* CURSOR */
.CodeMirror-cursor {
  border-left: 2px solid black;
  border-right: none;
  width: 0;
}

.CodeMirror div.CodeMirror-secondarycursor {
  border-left: 1px solid silver;
}

/* Common Styles */
span.cm-header,
span.cm-strong {
  font-weight: bold;
}

span.cm-em {
  font-style: italic;
}

span.cm-link {
  text-decoration: underline;
}

.CodeMirror-focused div.CodeMirror-cursors {
  visibility: visible;
}

.CodeMirror-selected {
  background: #c0dbfd;
}

/* Unique Dark Theme Styles */
.code-is-dark {
  font-weight: 350;
  color: #abb2bf;
  background-color: #282c34;
}

.code-is-dark .CodeMirror-selected {
  background-color: #3e4451;
}

.code-is-dark .CodeMirror-gutters {
  /* border-color: #363a42; */
  background: #20242a;
}

.code-is-dark .CodeMirror-linenumber {
  color: #5c6370 !important;
}

.code-is-dark .CodeMirror-cursor {
  border-left: 2px solid #aaaaaa !important;
}

.code-is-dark .cm-comment {
  color: rgb(106, 153, 85);
}

.code-is-dark .cm-builtin,
.code-is-dark .cm-keyword {
  color: rgb(86, 156, 214);
}

.code-is-dark .cm-number {
  color: rgb(181, 206, 168);
}

.code-is-dark .cm-def {
  color: rgb(100, 102, 149);
}

.code-is-dark .cm-variable,
.code-is-dark .cm-attribute {
  color: rgb(156, 220, 254);
}

.code-is-dark .cm-string {
  color: rgb(206, 145, 120);
}

.code-is-dark .cm-tag {
  color: rgb(78, 201, 176);
}

.code-is-dark .cm-punctuation,
.code-is-dark .cm-operator {
  color: rgb(212, 212, 212);
}

/* Scroll and Overflow */
.CodeMirror-scroll {
  overflow: scroll !important;
  margin-bottom: -30px;
  margin-right: -30px;
  padding-bottom: 30px;
  height: 100%;
  outline: none;
  position: relative;
}

.CodeMirror-sizer {
  position: relative;
  border-right: 30px solid transparent;
}

/* Scrollbars */
.CodeMirror-scrollbar-filler,
.CodeMirror-gutter-filler {
  background-color: white;
}

.code-is-dark .CodeMirror-scrollbar-filler,
.code-is-dark .CodeMirror-gutter-filler {
  background-color: #282c34;
}
/* Additional styles for handling scrolling, gutters, cursors, etc. */

.CodeMirror-vscrollbar,
.CodeMirror-hscrollbar,
.CodeMirror-scrollbar-filler,
.CodeMirror-gutter-filler {
  position: absolute;
  z-index: 6;
  display: none;
}

.CodeMirror-vscrollbar {
  right: 0;
  top: 0;
  overflow-x: hidden;
  overflow-y: scroll;
}

.CodeMirror-hscrollbar {
  bottom: 0;
  left: 0;
  overflow-y: hidden;
  overflow-x: scroll;
}

.CodeMirror-scrollbar-filler {
  right: 0;
  bottom: 0;
}

.CodeMirror-gutter-filler {
  left: 0;
  bottom: 0;
}

.CodeMirror-gutters {
  position: absolute;
  left: 0;
  top: 0;
  min-height: 100%;
  z-index: 3;
}

.CodeMirror-gutter {
  white-space: normal;
  height: 100%;
  display: inline-block;
  vertical-align: top;
  margin-bottom: -30px;
}

.CodeMirror-gutter-wrapper {
  position: absolute;
  z-index: 4;
  background: none !important;
  border: none !important;
}

.CodeMirror-gutter-background {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 4;
}

.CodeMirror-gutter-elt {
  position: absolute;
  cursor: default;
  z-index: 4;
}

.CodeMirror-gutter-wrapper {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

.CodeMirror-lines {
  cursor: text;
  min-height: 1px; /* prevents collapsing before first draw */
}

.CodeMirror-wrap pre {
  word-wrap: break-word;
  white-space: pre-wrap;
  word-break: normal;
}

.CodeMirror-linebackground {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 0;
}

.CodeMirror-linewidget {
  position: relative;
  z-index: 2;
  overflow: auto;
}

.CodeMirror-code {
  outline: none;
}

.CodeMirror-code > div {
  padding-left: 3px;
}

.CodeMirror-code > pre {
  padding-left: 8px;
}

/* Force content-box sizing for the elements where we expect it */
.CodeMirror-scroll,
.CodeMirror-sizer,
.CodeMirror-gutter,
.CodeMirror-gutters,
.CodeMirror-linenumber {
  -moz-box-sizing: content-box;
  box-sizing: content-box;
}

.CodeMirror-measure {
  position: absolute;
  width: 100%;
  height: 0;
  overflow: hidden;
  visibility: hidden;
}

.CodeMirror-cursor {
  position: absolute;
  pointer-events: none;
}

.CodeMirror-measure pre {
  position: static;
}

div.CodeMirror-cursors {
  visibility: hidden;
  position: relative;
  z-index: 3;
}

div.CodeMirror-dragcursors {
  visibility: visible;
}

.CodeMirror-focused div.CodeMirror-cursors {
  visibility: visible;
}

.CodeMirror-crosshair {
  cursor: crosshair;
}

.CodeMirror-line::selection,
.CodeMirror-line > span::selection,
.CodeMirror-line > span > span::selection {
  background: #c0dbfd;
}

.CodeMirror-line::-moz-selection,
.CodeMirror-line > span::-moz-selection,
.CodeMirror-line > span > span::-moz-selection {
  background: #c0dbfd;
}

.cm-searching {
  background: #ffa;
  background: rgba(255, 255, 0, 0.4);
}

/* Used to force a border model for a node */
.cm-force-border {
  padding-right: 0.1px;
}

@media print {
  /* Hide the cursor when printing */
  .CodeMirror div.CodeMirror-cursors {
    visibility: hidden;
  }
}

/* See issue #2901 */
.cm-tab-wrap-hack:after {
  content: '';
}

/* Help users use markselection to safely style text background */
span.CodeMirror-selectedtext {
  background: none;
}

/* Overlayscroll for Overlay Scrollbars */
.CodeMirror-overlayscroll .CodeMirror-scrollbar-filler,
.CodeMirror-overlayscroll .CodeMirror-gutter-filler {
  display: none;
}

.CodeMirror-overlayscroll-horizontal div,
.CodeMirror-overlayscroll-vertical div {
  position: absolute;
  background: #bcd;
  border-radius: 3px;
}

.CodeMirror-overlayscroll-horizontal,
.CodeMirror-overlayscroll-vertical {
  position: absolute;
  z-index: 6;
}

.CodeMirror-overlayscroll-horizontal {
  bottom: 0;
  left: 0;
  height: 6px;
}

.CodeMirror-overlayscroll-horizontal div {
  bottom: 0;
  height: 100%;
}

.CodeMirror-overlayscroll-vertical {
  right: 0;
  top: 0;
  width: 6px;
}

.CodeMirror-overlayscroll-vertical div {
  right: 2px;
  width: 100%;
}

/* SimpleScroll for Simple Scrollbars */
.CodeMirror-simplescroll-horizontal div,
.CodeMirror-simplescroll-vertical div {
  position: absolute;
  background: #ccc;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  border: 1px solid #bbb;
  border-radius: 2px;
}

.CodeMirror-simplescroll-horizontal,
.CodeMirror-simplescroll-vertical {
  position: absolute;
  z-index: 6;
  opacity: 0.4;
  background: #f4f4f4;
}

.code-is-dark .CodeMirror-simplescroll-horizontal,
.code-is-dark .CodeMirror-simplescroll-vertical {
  background: #282c34;
}

.code-is-dark .CodeMirror-simplescroll-horizontal div,
.code-is-dark .CodeMirror-simplescroll-vertical div {
  background: #424242;
  border: 1px solid #212121;
}

.code-is-dark .CodeMirror-simplescroll-horizontal div {
  background: #424242;
  border-bottom: 0;
}

.code-is-dark .CodeMirror-simplescroll-horizontal {
  bottom: -1px;
}

.CodeMirror-simplescroll-horizontal {
  bottom: 1px;
  left: 0;
  height: 8px;
}

.CodeMirror-simplescroll-horizontal div {
  bottom: 0;
  height: 100%;
}

.CodeMirror-simplescroll-vertical {
  right: 1px;
  top: 0;
  width: 8px;
}

.code-is-dark .CodeMirror-simplescroll-vertical {
  right: 0;
  width: 9px;
}

.CodeMirror-simplescroll-vertical div {
  right: 0;
  width: 100%;
}

.CodeMirror-activeline-background {
  background: #f7f7f9;
}

.code-is-dark .CodeMirror-activeline-background {
  background-color: rgba(153, 187, 255, 0.04);
}

/* CodeMirror Light Theme - Optimized */

.cm-negative {
  color: #d44;
}
.cm-positive {
  color: #292;
}
.cm-header,
.cm-strong {
  font-weight: bold;
}
.cm-em {
  font-style: italic;
}
.cm-link,
.code-is-light .cm-link,
.code-is-light span.cm-link {
  text-decoration: underline;
  color: #00c;
}
.cm-strikethrough {
  text-decoration: line-through;
}
.cm-invalidchar,
.code-is-light .cm-error,
.code-is-light span.cm-error {
  color: #f00;
}

/* CodeMirror Theme Styles */
.code-is-light .cm-header,
.code-is-light span.cm-header {
  color: blue;
}

.code-is-light .cm-quote,
.code-is-light span.cm-quote {
  color: #090;
}

.code-is-light .cm-keyword,
.code-is-light span.cm-keyword {
  color: #00a4db;
}

/* Updated to match PrismJS keyword color */
.code-is-light .cm-string,
.code-is-light .cm-string-2,
.code-is-light span.cm-string,
.code-is-light span.cm-string-2 {
  color: #e3116c;
}

/* Updated to match PrismJS string and attr-value color */
.code-is-light .cm-comment,
.code-is-light span.cm-comment {
  color: #999988;
}

/* Updated to match PrismJS comment color */
.code-is-light .cm-variable,
.code-is-light .cm-variable-2,
.code-is-light .cm-variable-3,
.code-is-light .cm-property,
.code-is-light span.cm-variable,
.code-is-light span.cm-variable-2,
.code-is-light span.cm-variable-3,
.code-is-light span.cm-property {
  color: #36acaa;
}

/* Updated to match PrismJS number, boolean, variable, constant, property, etc. color */
.code-is-light .cm-operator,
.code-is-light .cm-punctuation,
.code-is-light span.cm-operator,
.code-is-light span.cm-punctuation {
  color: #393a34;
}

/* Updated to match PrismJS punctuation and operator color */
.code-is-light .cm-def,
.code-is-light span.cm-def {
  color: #d73a49;
}

/* Updated to match PrismJS function, deleted, tag color */
.code-is-light .cm-atom,
.code-is-light .cm-tag,
.code-is-light span.cm-atom,
.code-is-light span.cm-tag {
  color: #00009f;
}

/* Updated to match PrismJS tag, selector, keyword color */
.code-is-light .cm-attribute,
.code-is-light span.cm-attr,
.code-is-light span.cm-attribute,
.code-is-light span.cm-hr {
  color: #00a4db;
}

/* Composing and Bracket Matching Styles */
.CodeMirror-composing {
  border-bottom: 2px solid;
}

div.CodeMirror span.CodeMirror-matchingbracket {
  color: #0f0;
}

div.CodeMirror span.CodeMirror-nonmatchingbracket {
  color: #f22;
}
